def binary_chop1(alist, data):
    n = len(alist)
    if n < 1:
        return False
    mid = n // 2
    if alist[mid] > data:
        return binary_chop1(alist[0:mid], data)
    elif alist[mid] < data:
        return binary_chop1(alist[mid+1:], data)
    else:
        return True

def binary_chop2(alist, data):
    n = len(alist)
    first = 0
    last = n - 1
    while first <= last:
        mid = (last + first) // 2
        if alist[mid] > data:
            last = mid - 1
        elif alist[mid] < data:
            first = mid + 1
        else:
            return True
    return False

if __name__ == '__main__':
    lis = [int(n) for n in input().split()]
    data = int(input())
    if binary_chop1(lis, data):
        print('ok')